#ifndef MISCUTILS
#define MISCUTILS

#include <stdio.h>
#include <math.h>


#define MAX(A, B) (A > B ? A : B)

/*
 * parâmetros de entrada do programa
 */


int verbose, stats, it1, it2;
double mu_delta, ttotal, t1, t2;


/*
 * mensagens de erro
 */
#define MSG_ERR_ARQ "cannot open file"
#define MSG_ERR_PREC "wrong use of precision"
#define MSG_ERR_MALLOC "cannot allocate memory"
#define MSG_PARAM_N "unrecognized option ignored"
#define MSG_ERR_BASE "cannot find initial base"
#define MSG_ERR_UK "unknown error"
#define MSG_ERR_MF "malformed input file"

int die(char *msg);
int dieHelp(char *msg);
int warning(char *msg);
int showUsage();
int equals(double a, double b);

#endif

